<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <base href="http://localhost:8080/file_upload_war_exploded/">
    <link rel="stylesheet" href="static/css/bootstrap.css">
</head>
<body>
<div class="container col-6">
    <form action="user/upd" enctype="multipart/form-data" method="post">
        <input type="hidden" name="id" value="${user.id}">
        <input type="hidden" name="oldFile" value="${user.imgPath}">
        <div class="form-group">
            <label>用户名</label>
            <input type="text" id="uName" name="uName" class="form-control"
                   aria-describedby="emailHelp" value="${user.UName}">
        </div>

        <div class="form-group">
            <label>邮箱</label>
            <input type="text" id="uEmail" name="uEmail" class="form-control"
                   aria-describedby="emailHelp" value="${user.UEmail}">
        </div>

        <div class="form-group">
            <label class="form-label">头像</label>
            <input class="form-control" name="imgFile" multiple="multiple" type="file">
        </div>

        <div class="form-group mt-3">
            <label class="form-label">原文件: <span id="oldFile">${user.imgPath}</span></label>
            <p><font color="red">${requestScope.msg}</font></p>
        </div>

        <div class="form-group mt-3">
            <button class="btn btn-primary col-2">保存</button>
        </div>
    </form>
</div>
</body>
</html>
